# -*- coding: utf-8 -*-
#
# This file has Traning Island's 1,2 1,1 2,1 2,2 cordinates
#
# PreAlpha0.1 Mapping Example 
#  Traning Island Cordinates x,y
#     123456789012345
#   1             ___1
#   2            /   2
#   3         __/    3   Y
#   4        /       4
#   5   ____/        5  
#   6  (             6 
#     123456789012345
#           X
tramap = [ "             ___","            /   ","         __/    ","        /      ","   ____/        ","  (             "] #Tam harita

class tramaper:
    def __init__(self,kordinat):
	self.kordinat = kordinat
        self.mevcutkonum = ""
        self.suan = "map21"
        self.map21 = { 
"15,2":[ "             ___","            /  X","         __/    ","        /       ","   ____/        ","  (             "],
"14,2":[ "             ___","            / X ","         __/    ","        /       ","   ____/        ","  (             "],
"13,2":[ "             ___","            /X  ","         __/    ","        /       ","   ____/        ","  (             "],
"15,3":[ "             ___","            /   ","         __/   X","        /       ","   ____/        ","  (             "],
"14,3":[ "             ___","            /   ","         __/  X ","        /       ","   ____/        ","  (             "],
"13,3":[ "             ___","            /   ","         __/ X  ","        /       ","   ____/        ","  (             "],
"12,3":[ "             ___","            /   ","         __/X   ","        /       ","   ____/        ","  (             "],
"15,4":[ "             ___","            /   ","         __/    ","        /      X","   ____/        ","  (             "],
"14,4":[ "             ___","            /   ","         __/    ","        /     X ","   ____/        ","  (             "],
"13,4":[ "             ___","            /   ","         __/    ","        /    X  ","   ____/        ","  (             "],
"12,4":[ "             ___","            /   ","         __/    ","        /   X   ","   ____/        ","  (             "],
"11,4":[ "             ___","            /   ","         __/    ","        /  X    ","   ____/        ","  (             "],
"10,4":[ "             ___","            /   ","         __/    ","        / X     ","   ____/        ","  (             "],
"9,4":[ "             ___","            /   ","         __/    ","        /X      ","   ____/        ","  (             "],
"15,5":[ "             ___","            /   ","         __/    ","        /       ","   ____/       X","  (             "],
"14,5":[ "             ___","            /   ","         __/    ","        /       ","   ____/      X ","  (             "],
"13,5":[ "             ___","            /   ","         __/    ","        /       ","   ____/     X  ","  (             "],
"12,5":[ "             ___","            /   ","         __/    ","        /       ","   ____/    X   ","  (             "],
"11,5":[ "             ___","            /   ","         __/    ","        /       ","   ____/   X    ","  (             "],
"10,5":[ "             ___","            /   ","         __/    ","        /       ","   ____/  X     ","  (             "],
"9,5":[ "             ___","            /   ","         __/    ","        /       ","   ____/ X      ","  (             "],
"8,5":[ "             ___","            /   ","         __/    ","        /       ","   ____/X       ","  (             "],
"15,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (            X"],
"14,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (           X "],
"13,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (          X  "],
"12,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (         X   "],
"11,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (        X    "],
"10,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (       X     "],
"9,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (      X      "],
"8,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (     X       "],
"7,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (    X        "],
"6,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (   X         "],
"5,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (  X          "],
"4,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  ( X           "],
"3,6":[ "             ___","            /   ","         __/    ","        /       ","   ____/        ","  (X            "],
"16,2":"map22:1,2",
"16,3":"map22:1,3",
"16,4":"map22:1,4",
"16,5":"map22:1,5",
"16,6":"map22:1,6",
"3,7":"map11,:3,1",
"4,7":"map11:4,1",
"5,7":"map11:5,1",
"6,7":"map11:6,1",
"7,7":"map11:7,1",
"8,7":"map11:7,1",
"9,7":"map11:9,1",
"10,7":"map11:10,1",
"11,7":"map11:11,1",
"12,7":"map11:12,1",
"13,7":"map11:13,1",
"14,7":"map11:14,1",
"15,7":"map11:15,1",
"16,7":"map11:16,1"}# Map (2,1) için durumlar.
        self.map22 = {
"1,2": [ "___             ","X  \            ","    \__         ","       \        ","        \____   ","             )  "],
"2,2": [ "___             "," X \            ","    \__         ","       \        ","        \____   ","             )  "],
"3,2": [ "___             ","  X\            ","    \__         ","       \        ","        \____   ","             )  "],
"1,3": [ "___             ","   \            ","X   \__         ","       \        ","        \____   ","             )  "],
"2,3": [ "___             ","   \            "," X  \__         ","       \        ","        \____   ","             )  "],
"3,3": [ "___             ","   \            ","  X \__         ","       \        ","        \____   ","             )  "],
"4,3": [ "___             ","   \            ","   X\__         ","       \        ","        \____   ","             )  "],
"1,4": [ "___             ","   \            ","    \__         ","X      \        ","        \____   ","             )  "],
"2,4": [ "___             ","   \            ","    \__         "," X     \        ","        \____   ","             )  "],
"3,4": [ "___             ","   \            ","    \__         ","  X    \        ","        \____   ","             )  "],
"4,4": [ "___             ","   \            ","    \__         ","   X   \        ","        \____   ","             )  "],
"5,4": [ "___             ","   \            ","    \__         ","    X  \        ","        \____   ","             )  "],
"6,4": [ "___             ","   \            ","    \__         ","     X \        ","        \____   ","             )  "],
"7,4": [ "___             ","   \            ","    \__         ","      X\        ","        \____   ","             )  "],
"1,5": [ "___             ","   \            ","    \__         ","       \        ","X       \____   ","             )  "],
"2,5": [ "___             ","   \            ","    \__         ","       \        "," X      \____   ","             )  "],
"3,5": [ "___             ","   \            ","    \__         ","       \        ","  X     \____   ","             )  "],
"4,5": [ "___             ","   \            ","    \__         ","       \        ","   X    \____   ","             )  "],
"5,5": [ "___             ","   \            ","    \__         ","       \        ","    X   \____   ","             )  "],
"6,5": [ "___             ","   \            ","    \__         ","       \        ","     X  \____   ","             )  "],
"7,5": [ "___             ","   \            ","    \__         ","       \        ","      X \____   ","             )  "],
"8,5": [ "___             ","   \            ","    \__         ","       \        ","       X\____   ","             )  "],
"1,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","X            )  "],
"2,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   "," X           )  "],
"3,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","  X          )  "],
"4,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","   X         )  "],
"5,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","    X        )  "],
"6,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","     X       )  "],
"7,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","      X      )  "],
"8,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","       X     )  "],
"9,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","        X    )  "],
"10,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","         X   )  "],
"11,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","          X  )  "],
"12,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","           X )  "],
"13,6": [ "___             ","   \            ","    \__         ","       \        ","        \____   ","            X)  "],
"0,2":"map21:15,2",
"0,3":"map21:15,3",
"0,4":"map21:15,4",
"0,5":"map21:15,5",
"0,6":"map21:15,6",
"1,7":"map12:1,1",
"2,7":"map12:2,1",
"3,7":"map12:3,1",
"4,7":"map12:4,1",
"5,7":"map12:5,1",
"6,7":"map12:6,1",
"7,7":"map12:7,1",
"8,7":"map12:8,1",
"9,7":"map12:9,1",
"10,7":"map12:10,1",
"11,7":"map12:11,1",
"12,7":"map12:12,1",
"13,7":"map12:13,1",
"14,7":"map12:14,1",
"15,7":"map12:15,1"} # Map (2,2) için durumlar.	
        self.map11 = {
"3,1": [ " (X___         ","      \        ","       \__     ","          \    ","           \___","               "],
"4,1": [ " (_X__         ","      \        ","       \__     ","          \    ","           \___","               "],
"5,1": [ " (__X_         ","      \        ","       \__     ","          \    ","           \___","               "],
"6,1": [ " (___X         ","      \        ","       \__     ","          \    ","           \___","               "],
"7,1": [ " (____X        ","      \        ","       \__     ","          \    ","           \___","               "],
"8,1": [ " (____ X       ","      \        ","       \__     ","          \    ","           \___","               "],
"9,1": [ " (____  X      ","      \        ","       \__     ","          \    ","           \___","               "],
"10,1": [ " (____   X     ","      \        ","       \__     ","          \    ","           \___","               "],
"11,1": [ " (____    X    ","      \        ","       \__     ","          \    ","           \___","               "],
"12,1": [ " (____     X   ","      \        ","       \__     ","          \    ","           \___","               "],
"13,1": [ " (____      X  ","      \        ","       \__     ","          \    ","           \___","               "],
"14.1": [ " (____       X ","      \        ","       \__     ","          \    ","           \___","               "],
"15,1": [ " (____        X","      \        ","       \__     ","          \    ","           \___","               "],
"8,2": [ " (____         ","      \X       ","       \__     ","          \    ","           \___","               "],
"9,2": [ " (____         ","      \ X      ","       \__     ","          \    ","           \___","               "],
"10,2": [ " (____         ","      \  X     ","       \__     ","          \    ","           \___","               "],
"11,2": [ " (____         ","      \   X    ","       \__     ","          \    ","           \___","               "],
"12,2": [ " (____         ","      \    X   ","       \__     ","          \    ","           \___","               "],
"13,2": [ " (____         ","      \     X  ","       \__     ","          \    ","           \___","               "],
"14,2": [ " (____         ","      \      X ","       \__     ","          \    ","           \___","               "],
"15,2": [ " (____         ","      \       X","       \__     ","          \    ","           \___","               "],
"9,3": [ " (____         ","      \        ","       \X_     ","          \    ","           \___","               "],
"10,3": [ " (____         ","      \        ","       \_X     ","          \    ","           \___","               "],
"11,3": [ " (____         ","      \        ","       \__X    ","          \    ","           \___","               "],
"12,3": [ " (____         ","      \        ","       \__ X   ","          \    ","           \___","               "],
"13,3": [ " (____         ","      \        ","       \__  X  ","          \    ","           \___","               "],
"14,3": [ " (____         ","      \        ","       \__   X ","          \    ","           \___","               "],
"15,3": [ " (____         ","      \        ","       \__    X","          \    ","           \___","               "],
"12,4": [ " (____         ","      \        ","       \__     ","          \X   ","           \___","               "],
"13,4": [ " (____         ","      \        ","       \__     ","          \ X  ","           \___","               "],
"14,4": [ " (____         ","      \        ","       \__     ","          \  X ","           \___","               "],
"15,4": [ " (____         ","      \        ","       \__     ","          \   X","           \___","               "],
"13,5": [ " (____         ","      \        ","       \__     ","          \    ","           \X__","               "],
"14,5": [ " (____         ","      \        ","       \__     ","          \    ","           \_X_","               "],
"15,5": [ " (____         ","      \        ","       \__     ","          \    ","           \__X","               "], 
"3,0":"map22:3,6",
"4,0":"map22:4,6",
"5,0":"map22:5,6",
"6,0":"map22:6,6",
"7,0":"map22:7,6",
"8,0":"map11:8,6",
"9,0":"map11:9,6",
"10,0":"map11:10,6",
"11,0":"map11:11,6",
"12,0":"map11:12,6",
"13,0":"map11:13,6",
"14,0":"map11:14,6",
"15,0":"map11:15,6",
"16,1":"map11:1,1",
"16,2":"map11:1,2",
"16,3":"map11:1,3",
"16,4":"map11:1,4",
"16,5":"map11:1,5"} # Map (1,1) için durumlar.
        self.map12 = {
"1,1": [ "X        ____) ","        /      ","     __/       ","    /          ","___/           ","               "],
"2,1": [ " X       ____) ","        /      ","     __/       ","    /          ","___/           ","               "],
"3,1": [ "  X      ____) ","        /      ","     __/       ","    /          ","___/           ","               "],
"4,1": [ "   X     ____) ","        /      ","     __/       ","    /          ","___/           ","               "],
"5,1": [ "    X    ____) ","        /      ","     __/       ","    /          ","___/           ","               "],
"6,1": [ "     X   ____) ","        /      ","     __/       ","    /          ","___/           ","               "],
"7,1": [ "      X  ____) ","        /      ","     __/       ","    /          ","___/           ","               "],
"8,1": [ "       X ____) ","        /      ","     __/       ","    /          ","___/           ","               "],
"9,1": [ "        X____) ","        /      ","     __/       ","    /          ","___/           ","               "],
"10,1": [ "         X___) ","        /      ","     __/       ","    /          ","___/           ","               "],
"11,1": [ "         _X__) ","        /      ","     __/       ","    /          ","___/           ","               "],
"12,1": [ "         __X_) ","        /      ","     __/       ","    /          ","___/           ","               "],
"13,1": [ "         ___X) ","        /      ","     __/       ","    /          ","___/           ","               "],
"1,2": [ "         ____) ","X       /      ","     __/       ","    /          ","___/           ","               "],
"2,2": [ "         ____) "," X      /      ","     __/       ","    /          ","___/           ","               "],
"3,2": [ "         ____) ","  X     /      ","     __/       ","    /          ","___/           ","               "],
"4,2": [ "         ____) ","   X    /      ","     __/       ","    /          ","___/           ","               "],
"5,2": [ "         ____) ","    X   /      ","     __/       ","    /          ","___/           ","               "],
"6,2": [ "         ____) ","     X  /      ","     __/       ","    /          ","___/           ","               "],
"7,2": [ "         ____) ","      X /      ","     __/       ","    /          ","___/           ","               "],
"8,2": [ "         ____) ","       X/      ","     __/       ","    /          ","___/           ","               "],
"1,3": [ "         ____) ","        /      ","X    __/       ","    /          ","___/           ","               "],
"2,3": [ "         ____) ","        /      "," X   __/       ","    /          ","___/           ","               "],
"3,3": [ "         ____) ","        /      ","  X  __/       ","    /          ","___/           ","               "],
"4,3": [ "         ____) ","        /      ","   X __/       ","    /          ","___/           ","               "],
"5,3": [ "         ____) ","        /      ","    X__/       ","    /          ","___/           ","               "],
"6,3": [ "         ____) ","        /      ","     X_/       ","    /          ","___/           ","               "],
"7,3": [ "         ____) ","        /      ","     _X/       ","    /          ","___/           ","               "],
"1,4": [ "         ____) ","        /      ","     __/       ","X   /          ","___/           ","               "],
"2,4": [ "         ____) ","        /      ","     __/       "," X  /          ","___/           ","               "],
"3,4": [ "         ____) ","        /      ","     __/       ","  X /          ","___/           ","               "],
"4,4": [ "         ____) ","        /      ","     __/       ","   X/          ","___/           ","               "],
"1,5": [ "         ____) ","        /      ","     __/       ","    /          ","X__/           ","               "],
"2,5": [ "         ____) ","        /      ","     __/       ","    /          ","_X_/           ","               "],
"3,5": [ "         ____) ","        /      ","     __/       ","    /          ","__X/           ","               "],
"1,0":"map22:1,6",
"2,0":"map22:2,6",
"3,0":"map22:3,6",
"4,0":"map22:4,6",
"5,0":"map22:5,6",
"6,0":"map22:6,6",
"7,0":"map22:7,6",
"8,0":"map22:8,6",
"9,0":"map22:9,6",
"10,0":"map22:10,6",
"11,0":"map22:11,6",
"12,0":"map22:12,6",
"13,0":"map22:13,6",
"0,1":"map11:15,1",
"0,2":"map11:15,2",
"0,3":"map11:15,3",
"0,4":"map11:15,4",
"0,5":"map11:15,5"}	# Map (1,2) için durumlar.
    
    def showmap(self):
        self.degistir()
	if self.mevcutkonum != None:
	    if self.mevcutkonum[0] == "m":
                self.mevcutkonum = self.mevcutkonum.split(":")
                self.suan = self.mevcutkonum[0]
                self.kordinat = self.mevcutkonum[1]
                self.degistir()
        return self.mevcutkonum 
    def degistir(self):
	if self.suan == "map21":
	    self.mevcutkonum = self.map21.get(self.kordinat) 
	elif self.suan == "map22":
	    self.mevcutkonum = self.map22.get(self.kordinat) 
        elif self.suan == "map11":
	    self.mevcutkonum = self.map11.get(self.kordinat) 
        elif self.suan == "map12":
	    self.mevcutkonum = self.map12.get(self.kordinat)
    def guncelle(self, kordinat):
        self.kordinat = kordinat
    def kordinatal(self):
        if self.suan == "map21":
	    self.mevcutkonum = self.map21.get(self.mevcutkonum) 
	elif self.suan == "map22":
	    self.mevcutkonum = self.map22.get(self.mevcutkonum) 
        elif self.suan == "map11":
	    self.mevcutkonum = self.map11.get(self.mevcutkonum)
        elif self.suan == "map12":
	    self.mevcutkonum = self.map12.get(self.mevcutkonum)
        return self.mevcutkonum 
